<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>Layui</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link rel="stylesheet" href="../layui/css/layui.css" media="all">
		<link rel="stylesheet" type="text/css" href="font.css" />
		<!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
	</head>
	<style type="text/css">
		img {
			width: 100%;
		}
	</style>

	<body>
		<div class="layui-row">
			<!--
        	作者：392019883@qq.com
        	时间：2020-06-21
        	描述：头部文件 header
        -->
			<div class="layui-row" style="background-color: #EEEEEE;height: 50px; margin-bottom: 10px;">
				<div class="layui-container" id="header">
					<div class="layui-row" height="50px" style="line-height: 50px;">
						<div class="layui-col-md1">
							<img src="../favicon.ico" class="logo" height="40px" />
						</div>
						<div class="layui-col-md3 layui-col-md-offset8">
							<div class="layui-row">
								<div class="layui-col-md4" id="yongjin">佣金:</div>
								<!-- <li class="layui-nav-item" id="yongjin">佣金</li> -->
								<div class="layui-col-md8" id="header_login">登录</div>
								<div class="layui-col-md3" id="header_register" style="display: none;">
									<a href="user/register.html">注册</a>
								</div>
							</div>
						</div>

					</div>
				</div>
			</div>
			<div class="layui-row">
				<div class="layui-container">
					<div class="layui-carousel" id="test10">
						<div carousel-item="">
							<div><img src="image/11111.jpg" style="height: 100%;"></div>
							<div><img src="https://g-search1.alicdn.com/img/bao/uploaded/i4/i2/725677994/O1CN01rcNOcL28vIkrdHTck_!!0-item_pic.jpg_580x580Q90.jpg_.webp"></div>
							<div><img src="https://g-search2.alicdn.com/img/bao/uploaded/i4/i2/2181875971/O1CN01xlBYox1tylVX6piPT_!!2181875971-0-lubanu-s.jpg_580x580Q90.jpg_.webp"></div>
							<div><img src="https://g-search2.alicdn.com/img/bao/uploaded/i4/i2/2181875971/O1CN01xlBYox1tylVX6piPT_!!2181875971-0-lubanu-s.jpg_580x580Q90.jpg_.webp"></div>
							<div><img src="https://g-search2.alicdn.com/img/bao/uploaded/i4/i2/2260259188/O1CN01mDuXjF2Hk9ekECub8_!!2260259188-0-lubanu-s.jpg_580x580Q90.jpg_.webp"></div>
							<div><img src="https://g-search3.alicdn.com/img/bao/uploaded/i4/i1/2168800166/O1CN01xkA9Nu1D64LIkdiJ4_!!2168800166-0-lubanu-s.jpg_580x580Q90.jpg_.webp"></div>
							<div><img src="https://g-search3.alicdn.com/img/bao/uploaded/i4/i1/2168800166/O1CN01xkA9Nu1D64LIkdiJ4_!!2168800166-0-lubanu-s.jpg_580x580Q90.jpg_.webp"></div>
						</div>
					</div>
				</div>
			</div>
			<div class="layui-row">
				<div class="layui-container">
					<hr class="layui-bg-orange" />
				</div>
			</div>
			<div class="layui-row">
				<div class="layui-container">
					<div id="LAY_demo1" class="layui-row layui-col-space15" style="align-content: center;text-align: center;">
					</div>
				</div>
			</div>

		</div>
		<!--
        	作者：392019883@qq.com
        	时间：2020-06-21
        	描述：底部文件 footer
        -->
		<div class="layui-container">
			<hr class="layui-bg-gray" />
		</div>
		<div class="layui-container" style="margin: 10px auto 10px auto;">
			管理员QQ:359761063
		</div>
		<script src="../layui/layui.js" charset="utf-8"></script>
		<script>
			layui.use(['carousel', 'form'], function() {
				var carousel = layui.carousel,
					form = layui.form;
				var $ = layui.jquery;

				$("#bottom").load("bottom.html");
				//图片轮播
				carousel.render({
					elem: '#test10',
					width: '100%'
						//,heigh:"80px"
						,
					interval: 2000,
					autoplay: true,
					arrow: "always",
					interval: 3000
				});

			});

			layui.use(['carousel', 'form', 'flow'], function() {
				var flow = layui.flow;
				var $ = layui.jquery;
				var carousel = layui.carousel,
					form = layui.form;

				if(localStorage.login_font_name && localStorage.login_font_name != "") {
					$("#header_login").html('<a href="index.html" >' + '欢迎:' + localStorage.login_font_name + '</a>');
					$("#header_register").html('');
					console.log($("#header_login").val());
					$("#yongjin").append(localStorage.login_font_yongjin);
				} else {
					$("#yongjin").html('<a href="user/register.html" >' + '前往注册' + '</a>');
					$("#header_login").html('<a href="login.html" >' + '前往登录' + '</a>');
				}
				//$("#header").load("header.html");
				flow.load({
					elem: '#LAY_demo1' //流加载容器
						//,scrollElem: '#LAY_demo1' //滚动条所在元素，一般不用填，此处只是演示需要。
						,
					done: function(page, next) { //执行下一页的回调
						var lis = [];
						$.get('http://127.0.0.1:88/index.php/font/font/getfont?page=' + page, function(res) {
							layui.each(res.data, function(index, item) {
								console.log(res.data[index]['renwu_img_url']);
								lis.push('<div class="layui-col-xs6 layui-col-sm4 layui-col-md3 pailie">' +
									'<a href="detail.html?id=' + res.data[index]['renwu_id'] + '"><div class="item">' +
									'<img src="' + res.data[index]['renwu_img_url'] + '" width="100%" alt="">' +
									'<p class="price">本金：￥' + res.data[index]['renwu_good_payPrice'] + '元</p>' +
									'<p class="price">佣金：￥' + res.data[index]['renwu_good_money'] + '元</p>' +
									'<a href=""><p class="title shubiao">' + (res.data[index]['renwu_good_titles']) + '</p>' +
									'<p><div class="layui-col-md4"><i class="layui-icon" style="font-size: 30px; color: #F40;">&#xe653;&nbsp;</i>平台:<span class="shop shubiao">' + res.data[index]['renwu_shop_type'] + '</span></div></p>' +
									'<p><div class="layui-col-md8"><i class="layui-icon" style="font-size: 30px; color: #F40;">&#xe653;&nbsp;</i>商家:<span class="shop shubiao">' + res.data[index]['renwu_good_shop'] + '</span></div></p>' +
									'<p><i class="layui-icon" style="font-size: 30px; color: #F40;">&#xe60e;&nbsp;</i>时间:<span class="shop shubiao">' + res.data[index]['renwu_addTime'] + '</span></p>' +
									'</div><a>' +
									'</div>');
							});
							next(lis.join(''), page < 9);
						})
					}
				});

			});
		</script>

	</body>

</html>